<template>
    <div class="svg_icon_link">
         <div class="svg_icon">
    <svg
      class="svg-icon"
      aria-hidden="true"
      :style="style"
    >
      <use :xlink:href="'#' + name" />
    </svg>
  </div>
    </div>
</template>

<script>
const req = require.context("@/assets/svg", false, /\.svg$/);
const requireAll = requireContext => requireContext.keys().map(requireContext);
requireAll(req);
    export default {
        name:'IconFont',
        props: {
    name: {
      type: String,
      default: ""
    },
    size: {
      type: Number,
      default:230
    }
  },
  computed: {
    style() {
      return {
        width: this.size / 2 / 100 + "rem",
        height: this.size / 2 / 100 + "rem"
      };
    }
  }
    }
</script>

<style lang="scss" scoped>
.svg_icon_link{
    padding-bottom: 3px;
}
    .svg-icon {
        width: 1em;
        height: 1em;
        display: block;
        fill: #000;
        overflow: hidden;
        padding-left: 9px;
}
</style>